import http from '@/utils/http'

// /home/banner
// 首页-广告区域-小程序
// distributionSite 首页=1 分类页面=2

/**
 * 
 * 首页-广告区域-小程序
 * @param {Number} distributionSite 1=首页 2=分类页面
 */
export const getHomeBanner = (distributionSite = 1) => {
    return http({
        url:"/home/banner",
        data:{
            distributionSite
        }
    })
}

/**
 * 
 * 首页-前台分类-小程序
 */
export const getHomeCategoryMutli = () => {
    return http({
      url: "/home/category/mutli",
    });
};

/**
 * 首页-热门推荐-小程序
 */
export const getHomeHotMutli = () => {
    return http({
        url:"/home/hot/mutli"
    })
}

/**
 * 首页-新鲜好物-小程序
 */
export const getHomeNew = () =>{
    return http({
        url:"/home/new"
    })
}

/**
 * 猜你喜欢-小程序
 */
export const getHomeGoodsGuessLike = (data) => {
    return http({
      url: "/home/goods/guessLike",
      data,
    });
};

/**
 * * 根据 首页的人气推荐模块需求，来返回对应的数据
 * @param {String} url 
 * @param {Object} data 
 * @returns 
 */
export const getHomeRecommend = (url,data = {}) => {
    return http({
        url,
        data
    })
}